﻿using System;
using System.Collections.Generic;
using Module.Core.Member;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.OleDb;
using System.Data.SqlClient;
using System.Data;

namespace Web.Test.ConTrols
{
    public partial class UpgradeAcount : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            lblMess.Text = "";
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            int status =0;
           TreeMemBer tree = new TreeMemBer();
           try
           {
               status = Int32.Parse(txtCap.Text.Trim());
           }catch(Exception ee){
               throw;
           }
           tree.upgradeAcount(status,txtMa.Text.Trim());
           tree.upgradeMember(txtMa.Text.Trim());
           txtCap.Text = "";
           txtMa.Text = "";
        }

        protected void btnDelUpgrade_Click(object sender, EventArgs e)
        {
           TreeMemBer tree = new TreeMemBer();
           if (tree.delUpgrade())
               lblMess.Text = " Xóa nâng cấp thành công";   
            else
               lblMess.Text = "không Xóa được nâng cấp";   
        }

    }
}